<%@page import="com.person.pojo.ArticleNumInfo"%>
<%@page import="com.person.vo.Article"%>
<%@page import="java.util.List"%>
<%@page import="com.person.daoImpl.AdminDaoImpl"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:if test="${requestScope.anif == null }">
	<jsp:forward page="/articlePaging"/>
</c:if>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>博文列表</title>
    <link rel="stylesheet" href="/PersonalBlog/backManaSyst/css/articleList.css">
</head>
<body>
 
    <div class="article-list">
        <!-- 显示列表 -->
        <div class="showList">
        
        <div class="search">
            <form action="/PersonalBlog/articlePaging" method="post">
                <span>搜索标题</span> <input type="text" name="search"/>
                <input type="submit" value="搜索"/>
            </form>
        </div>
            <table>
                <tr>
                    <th>ID</th>
                    <th>标题</th>
                    <th>创建时间</th>
                    <th>浏览量</th>
                    <th>点赞量</th>
                    <th>分类</th>
                    <th>操作</th>
                </tr>
                <c:forEach items="${requestScope.anif.lists }" var="arti">
                <tr>
                    <td>${arti.id }</td>
                    <td class="width-set">${arti.title }</td>
                    <td class="width-set">${arti.strDate }</td>
                    <td>lorem</td>
                    <td>lorem</td>
                    <td>lorem</td>
                    <td class="width-set">
                        <a href=""><div class="conments box-style">查看评论</div></a>
                        <a href="/PersonalBlog/backManaSyst/articleEditor.jsp?id=${arti.id }"><div class="editor box-style">编辑</div></a>
                        <a href="/PersonalBlog/articleDelete?id=${arti.id }"><div class="delete box-style">删除</div></a>
                    </td>
                </tr>
              </c:forEach>
              
            </table>
            
            <div class="field">
            <div class="turning">
                <a href="/PersonalBlog/articlePaging?pageNum=${requestScope.anif.pageNum - 1}"><i class="prior iconfont iconicon-arrow-left"></i></a>
						<c:forEach var="i" begin="1" end="${requestScope.anif.pageSum }">
                    		<a href="/PersonalBlog/articlePaging?pageNum=${i }"><div class="numpages"><span>${i }</span></div></a>
						</c:forEach>
                <a href="/PersonalBlog/articlePaging?pageNum=${requestScope.anif.pageNum + 1}"><i class="next iconfont iconicon-arrow-right"></i></a>
            </div>
            <div class="pages">
                <form action="/PersonalBlog/articlePaging" method="post">
                    <span>到第</span>
                    <input type="text" name="pageNum">
                    <span>页</span>
                    <input type="submit" value="确定">
                </form>
            </div>

            <div class="totalNum">共<span>${requestScope.anif.pageSum }</span>页</div>
        </div>
        </div>
    </div>
    <script>
    	var numpages = document.querySelectorAll(".numpages");
    	numpages[${requestScope.anif.pageNum - 1}].style.backgroundColor = "darkgoldenrod";
    </script>
</body>
</html>
